import type { RouteRecordRaw } from 'vue-router';
import { $t } from '#/locales';

const routes: RouteRecordRaw[] = [
  {
    name: 'Mes/pro',
    path: '/mes/pro',
    redirect: 'noRedirect',
    meta: {
      title: $t('mes.mespro.title'),
      icon: 'ic:baseline-view-in-ar',
      noCache: false
    },
    children: [
      {
        name: 'Workorder',
        path: 'workorder',
        component: () => import('#/views/mes/pro/workorder/index.vue'),
        meta: {
          title: $t('mes.mespro.children.Workorder.title'),
          icon: 'log'
        }
      },
      {
        name: 'Process',
        path: 'process',
        component: () => import('#/views/mes/pro/process/index.vue'),
        meta: {
          title: $t('mes.mespro.children.Process.title'),
          icon: 'druid'
        }
      },
      {
        name: 'Proroute',
        path: 'proroute',
        component: () => import('#/views/mes/pro/proroute/index.vue'),
        meta: {
          title: $t('mes.mespro.children.Proroute.title'),
          icon: 'nested'
        }
      },
      {
        name: 'Proschedule',
        path: 'proschedule',
        component: () => import('#/views/mes/pro/schedule/index.vue'),
        meta: {
          title: $t('mes.mespro.children.Proschedule.title'),
          icon: 'build'
        }
      },
      {
        name: 'Feedback',
        path: 'feedback',
        component: () => import('#/views/mes/pro/feedback/index.vue'),
        meta: {
          title: $t('mes.mespro.children.Feedback.title'),
          icon: 'chart'
        }
      }
    ]
  }
];

export default routes;
